package com.heima.user.controller;

import com.heima.api.user.ApUserRelationControllerApi;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.UserRelationDto;
import com.heima.user.service.ApUserRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @作者 itcast
 * @创建日期 2020/10/7 16:30
 **/
@RestController
@RequestMapping("/api/v1/user")
public class ApUserRelationController implements ApUserRelationControllerApi {
    @Autowired
    private ApUserRelationService apUserRelationService;
    @PostMapping("/user_follow")
    @Override
    public ResponseResult follow(@RequestBody UserRelationDto dto) {
        return apUserRelationService.follow(dto);
    }
}
